// history模式
import {
    createRouter,
    createWebHashHistory,
} from 'vue-router'

import Login from '../views/LoginPage.vue'
import RegisterPage from "@/views/RegisterPage.vue";
import MainPage from "@/views/MainPage.vue";
const routes = [
// 路由的默认路径
    {
        path:'/',
        component: Login
    },{
        path:'/register',
        component: RegisterPage
    },{
        path:'/main',
        component: MainPage
    },

]

// 创建路由对象
const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router;
